package com.newzqxq.common.enums;

/**
 * @author 石清
 * @Description   0=灰名单，1=白名单,2=黑名单  3=未识别
 * @create 2017-12-04 12:23
 **/
public enum BlockListFlatEnums {

    GRAY(0,"灰名单"),
    WHITE(1,"白名单"),
    BLACK(2,"黑名单"),
    UNIDENTIFIED(3,"未识别");
    private Integer code;
    private String message;

    BlockListFlatEnums(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public static BlockListFlatEnums get(int code){
        for (BlockListFlatEnums order:BlockListFlatEnums.values()){
            if (order.getCode()==code){
                return order;
            }
        }
        return null;
    }
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
